/*
 * @Description: 
 * @Author: ldx
 * @Date: 2023-03-24 08:56:00
 * @LastEditors: ldx
 * @LastEditTime: 2023-03-24 08:56:20
 */
export default class Sky {
  constructor(gl) {
    this.gl = gl
    this.children = []
  }
  /** 添加子对象 */
  add(obj) {
    obj.gl = this.gl
    this.children.push(obj)
  }
  /** 更新子对象的顶点数据 */
  updateVertices(params) {
    this.children.forEach(ele => {
      ele.updateVertices(params)
    })
  }
  /** 遍历子对象绘图 */
  draw(types) {
    this.children.forEach(ele => {
      ele.init()
      ele.draw(types)
    })
  }
}